<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['pending.approval.partner.list']}">
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputLabel for="code" value="#{messages['partner.code']}" styleClass="standardText_Label" />
		<t:inputText id="code"  size="30" maxlength="50" styleClass="standardText" value="#{adminPartnerPendingApprovalManagementBean.code}"></t:inputText>
		
		<h:outputLabel for="cname" value="#{messages['company.name']}" styleClass="standardText_Label" />
		<t:inputText id="cname"  size="30" maxlength="50" styleClass="standardText" value="#{adminPartnerPendingApprovalManagementBean.name}"></t:inputText>
		
		<t:outputText></t:outputText>
		<h:commandButton value="#{messages['search']}" styleClass="button"  action="#{adminPartnerPendingApprovalManagementBean.searchAction}" actionListener="#{adminPartnerPendingApprovalManagementBean.searchActionListener}"></h:commandButton>
	</t:panelGrid>
	
	<rich:spacer height="20" />

	<rich:dataTable id="data" var="obj" value="#{adminPartnerPendingApprovalManagementBean.partnerList}" rows="10" width="99%" rowKeyVar="rowNo">
		<rich:column style="text-align:center;width:5%;" >
			<f:facet name="header">
				<h:selectBooleanCheckbox id="chkAll" onclick="checkAll(this.form,this)" ></h:selectBooleanCheckbox>
			</f:facet>
			<h:selectBooleanCheckbox id="chk" value=""></h:selectBooleanCheckbox>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['registration.no']}"></h:outputText>
			</f:facet>
			<%--<t:outputText styleClass="standardText" value="#{obj.partnerRegNo}"></t:outputText>--%>
			<h:commandLink value="#{obj.partnerRegNo}" action="#{adminPartnerPendingApprovalManagementBean.navPartnerProfileAction}" actionListener="#{adminPartnerPendingApprovalManagementBean.navPartnerProfileActionListener}"></h:commandLink>
			<f:param id="pId" value="#{obj.partnerId}"/>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['contact.person']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.contactPerson}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['company.name']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.compName}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:13%;">
			<f:facet name="header">
				<h:outputText value="#{messages['status']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.statusLabel}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:13%;">
			<f:facet name="header">
				<h:outputText value="#{messages['document.check.list']}"></h:outputText>
			</f:facet>
			<h:commandButton styleClass="button" value="#{messages['action']}" 
				actionListener="#{adminPartnerPendingApprovalManagementBean.checkListActionListener}"
				rendered="#{obj.status == adminPartnerPendingApprovalManagementBean.checkListStatus}" 
				action="#{adminPartnerPendingApprovalManagementBean.checkListAction}" immediate="true"></h:commandButton>
			<h:outputText styleClass="standardText" rendered="#{obj.status != adminPartnerPendingApprovalManagementBean.checkListStatus}" 
				value="N/A"></h:outputText>
				<f:param id="partnerId" value="#{obj.partnerId}"/>
		</rich:column>
		<%--<rich:column style="text-align:center;width:13%;">
			<f:facet name="header">
				<h:outputText value="#{messages['approval']}"></h:outputText>
			</f:facet>
			<h:commandButton styleClass="button" value="#{messages['action']}" 
				rendered="#{obj.status == adminPartnerPendingApprovalManagementBean.pendingStatus}" action="" 
					immediate="true"></h:commandButton>
			<h:outputText styleClass="standardText" rendered="#{obj.status != adminPartnerPendingApprovalManagementBean.pendingStatus}"
				 value="N/A"></h:outputText>
		</rich:column>
		--%>
	</rich:dataTable>
	
	<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />

	<rich:spacer height="30" />
	
	<t:panelGrid columns="1" width="100%">
		<t:panelGroup>
			<%--<h:commandButton value="#{messages['delete']}" styleClass="button"  immediate="true" action=""></h:commandButton>
		 	<f:verbatim>&nbsp;</f:verbatim>--%>
		 	<h:commandButton value="#{messages['create']}" styleClass="button"  immediate="true" action="#{adminPartnerRegBean.navRegParnter}"></h:commandButton>
		 	<f:verbatim>&nbsp;</f:verbatim>
   			<h:commandButton value="#{messages['cancel']}" styleClass="button" immediate="true" action="#{adminPartnerPendingApprovalManagementBean.backAction}"></h:commandButton>
   		</t:panelGroup>
	</t:panelGrid>
</rich:panel>
